Skip to content

Add fromspan method for NDArray and optimize NDArray loading performance#522

Open
embeddetech wants to merge 1 commit intoSciSharp:masterfrom
embeddetech:fix/fromspan-support
Open

Add fromspan method for NDArray and optimize NDArray loading performance#522
embeddetech wants to merge 1 commit intoSciSharp:masterfrom
embeddetech:fix/fromspan-support

Conversation

@embeddetech
Copy link

@embeddetech embeddetech commented Apr 12, 2025

Added the ability to load an NDArray from span< bytes >, completed loading of various missing types, and optimized the loading time using marshaling instead of BitConverter.

@embeddetech
Copy link
Author

embeddetech commented Apr 12, 2025

Note: I added the fromspan method to the np.frombuffer.cs file. It may be preferable to create a separate np.fromspan.cs file, but I did not do that. Using span< bytes > is faster in parsing scenarios to avoid allocating byte arrays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant